package jml.defaultimple;

import java.util.ArrayList;
import java.util.List;

import jml.def.Label;
import jml.def.Title;

public class LabelImple implements Label
{
	public String name;
	public ArrayList<Title> titles;
	public ArrayList<String> sublabels;
	
	public LabelImple()
	{
		titles = new ArrayList<Title>();
		sublabels = new ArrayList<String>();
	}
	
	public void setName(String n)
	{
		this.name=n;
	}
	@Override
	public String getName()
	{
		return name;
	}
	
	public void addTitle(Title t)
	{
		titles.add(t);
	}
	
	public ArrayList<Title> getListTitles()
	{
		return titles;
	}

	@Override
	public List<Title> getTitles()
	{
		return titles;
	}
	
	public void addSublabel(String lbl)
	{
		sublabels.add(lbl);
	}

	@Override
	public List<String> getSublabels()
	{
		return sublabels;
	}
	
	@Override
	public String toString()
	{
		String s = "Label: [name=" + name + ", sublabels=" + sublabels + "]\n";
//		s+="Tittles [\n";
//		for(Tittle t:tittles)
//		{
//			s +=t.toString();
//		}
//		s+="]\n";
//		
		return s;
	}
}
